// TechPropertyPage.cpp : implementation file
//

#include "stdafx.h"
#include "ConfigGUI.h"
#include "..\resource\ConfigGUI\resrc1.h"
#include "TrainDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CTechPropertyPage property page

IMPLEMENT_DYNCREATE(CTechPropertyPage, CPropertyPage)

CTechPropertyPage::CTechPropertyPage() : CPropertyPage(CTechPropertyPage::IDD)
{
	//{{AFX_DATA_INIT(CTechPropertyPage)
	m_iLine = -1;
	//}}AFX_DATA_INIT
}

CTechPropertyPage::~CTechPropertyPage()
{
}

void CTechPropertyPage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTechPropertyPage)
	DDX_Radio(pDX, IDR_WLINE, m_iLine);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CTechPropertyPage, CPropertyPage)
	//{{AFX_MSG_MAP(CTechPropertyPage)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTechPropertyPage message handlers

BOOL CTechPropertyPage::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) 
{
	// TODO: Add your specialized code here and/or call the base class
	switch (((LPNMHDR)lParam)->code) 
    {
    case PSN_SETACTIVE:
		return TRUE;
	}
	return CPropertyPage::OnNotify(wParam, lParam, pResult);
}

BOOL CTechPropertyPage::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	switch (pMsg->message)
	{
	case WM_KEYDOWN:
		switch (pMsg->wParam)
		{
		case VK_ESCAPE:
			::SendMessage(GetPropSheet()->GetContainer()->GetSafeHwnd(),
							WM_KEYDOWN, pMsg->wParam, pMsg->lParam);
			return TRUE;
		}
	}

	return CPropertyPage::PreTranslateMessage(pMsg);
}
